<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - id:000977,sync:fuzzer2,src:001052.lcov_info_final - test/gmock-1.7.0/gtest/src/gtest-typed-test.cc</title>
  <link rel="stylesheet" type="text/css" href="../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../index.html">top level</a> - <a href="index.html">test/gmock-1.7.0/gtest/src</a> - gtest-typed-test.cc<span style="font-size: 80%;"> (source / <a href="gtest-typed-test.cc.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">id:000977,sync:fuzzer2,src:001052.lcov_info_final</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">36</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2016-03-13 10:42:47</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">3</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr><td><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : // Copyright 2008 Google Inc.</a>
<span class="lineNum">       2 </span>            : // All Rights Reserved.
<span class="lineNum">       3 </span>            : //
<span class="lineNum">       4 </span>            : // Redistribution and use in source and binary forms, with or without
<span class="lineNum">       5 </span>            : // modification, are permitted provided that the following conditions are
<span class="lineNum">       6 </span>            : // met:
<span class="lineNum">       7 </span>            : //
<span class="lineNum">       8 </span>            : //     * Redistributions of source code must retain the above copyright
<span class="lineNum">       9 </span>            : // notice, this list of conditions and the following disclaimer.
<span class="lineNum">      10 </span>            : //     * Redistributions in binary form must reproduce the above
<span class="lineNum">      11 </span>            : // copyright notice, this list of conditions and the following disclaimer
<span class="lineNum">      12 </span>            : // in the documentation and/or other materials provided with the
<span class="lineNum">      13 </span>            : // distribution.
<span class="lineNum">      14 </span>            : //     * Neither the name of Google Inc. nor the names of its
<span class="lineNum">      15 </span>            : // contributors may be used to endorse or promote products derived from
<span class="lineNum">      16 </span>            : // this software without specific prior written permission.
<span class="lineNum">      17 </span>            : //
<span class="lineNum">      18 </span>            : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
<span class="lineNum">      19 </span>            : // &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
<span class="lineNum">      20 </span>            : // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
<span class="lineNum">      21 </span>            : // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
<span class="lineNum">      22 </span>            : // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
<span class="lineNum">      23 </span>            : // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
<span class="lineNum">      24 </span>            : // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
<span class="lineNum">      25 </span>            : // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
<span class="lineNum">      26 </span>            : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
<span class="lineNum">      27 </span>            : // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<span class="lineNum">      28 </span>            : // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<span class="lineNum">      29 </span>            : //
<span class="lineNum">      30 </span>            : // Author: wan@google.com (Zhanyong Wan)
<span class="lineNum">      31 </span>            : 
<span class="lineNum">      32 </span>            : #include &quot;gtest/gtest-typed-test.h&quot;
<span class="lineNum">      33 </span>            : #include &quot;gtest/gtest.h&quot;
<span class="lineNum">      34 </span>            : 
<span class="lineNum">      35 </span>            : namespace testing {
<span class="lineNum">      36 </span>            : namespace internal {
<span class="lineNum">      37 </span>            : 
<span class="lineNum">      38 </span>            : #if GTEST_HAS_TYPED_TEST_P
<span class="lineNum">      39 </span>            : 
<a name="40"><span class="lineNum">      40 </span>            : // Skips to the first non-space char in str. Returns an empty string if str</a>
<span class="lineNum">      41 </span>            : // contains only whitespace characters.
<span class="lineNum">      42 </span><span class="lineNoCov">          0 : static const char* SkipSpaces(const char* str) {</span>
<span class="lineNum">      43 </span><span class="lineNoCov">          0 :   while (IsSpace(*str))</span>
<span class="lineNum">      44 </span><span class="lineNoCov">          0 :     str++;</span>
<span class="lineNum">      45 </span><span class="lineNoCov">          0 :   return str;</span>
<span class="lineNum">      46 </span>            : }
<span class="lineNum">      47 </span>            : 
<span class="lineNum">      48 </span>            : // Verifies that registered_tests match the test names in
<a name="49"><span class="lineNum">      49 </span>            : // defined_test_names_; returns registered_tests if successful, or</a>
<span class="lineNum">      50 </span>            : // aborts the program otherwise.
<span class="lineNum">      51 </span><span class="lineNoCov">          0 : const char* TypedTestCasePState::VerifyRegisteredTestNames(</span>
<span class="lineNum">      52 </span>            :     const char* file, int line, const char* registered_tests) {
<span class="lineNum">      53 </span>            :   typedef ::std::set&lt;const char*&gt;::const_iterator DefinedTestIter;
<span class="lineNum">      54 </span><span class="lineNoCov">          0 :   registered_ = true;</span>
<span class="lineNum">      55 </span>            : 
<span class="lineNum">      56 </span>            :   // Skip initial whitespace in registered_tests since some
<span class="lineNum">      57 </span>            :   // preprocessors prefix stringizied literals with whitespace.
<span class="lineNum">      58 </span><span class="lineNoCov">          0 :   registered_tests = SkipSpaces(registered_tests);</span>
<span class="lineNum">      59 </span>            : 
<span class="lineNum">      60 </span><span class="lineNoCov">          0 :   Message errors;</span>
<span class="lineNum">      61 </span><span class="lineNoCov">          0 :   ::std::set&lt;std::string&gt; tests;</span>
<span class="lineNum">      62 </span><span class="lineNoCov">          0 :   for (const char* names = registered_tests; names != NULL;</span>
<span class="lineNum">      63 </span>            :        names = SkipComma(names)) {
<span class="lineNum">      64 </span><span class="lineNoCov">          0 :     const std::string name = GetPrefixUntilComma(names);</span>
<span class="lineNum">      65 </span><span class="lineNoCov">          0 :     if (tests.count(name) != 0) {</span>
<span class="lineNum">      66 </span><span class="lineNoCov">          0 :       errors &lt;&lt; &quot;Test &quot; &lt;&lt; name &lt;&lt; &quot; is listed more than once.\n&quot;;</span>
<span class="lineNum">      67 </span><span class="lineNoCov">          0 :       continue;</span>
<span class="lineNum">      68 </span>            :     }
<span class="lineNum">      69 </span>            : 
<span class="lineNum">      70 </span><span class="lineNoCov">          0 :     bool found = false;</span>
<span class="lineNum">      71 </span><span class="lineNoCov">          0 :     for (DefinedTestIter it = defined_test_names_.begin();</span>
<span class="lineNum">      72 </span><span class="lineNoCov">          0 :          it != defined_test_names_.end();</span>
<span class="lineNum">      73 </span>            :          ++it) {
<span class="lineNum">      74 </span><span class="lineNoCov">          0 :       if (name == *it) {</span>
<span class="lineNum">      75 </span><span class="lineNoCov">          0 :         found = true;</span>
<span class="lineNum">      76 </span><span class="lineNoCov">          0 :         break;</span>
<span class="lineNum">      77 </span>            :       }
<span class="lineNum">      78 </span>            :     }
<span class="lineNum">      79 </span>            : 
<span class="lineNum">      80 </span><span class="lineNoCov">          0 :     if (found) {</span>
<span class="lineNum">      81 </span><span class="lineNoCov">          0 :       tests.insert(name);</span>
<span class="lineNum">      82 </span>            :     } else {
<span class="lineNum">      83 </span><span class="lineNoCov">          0 :       errors &lt;&lt; &quot;No test named &quot; &lt;&lt; name</span>
<span class="lineNum">      84 </span><span class="lineNoCov">          0 :              &lt;&lt; &quot; can be found in this test case.\n&quot;;</span>
<span class="lineNum">      85 </span>            :     }
<span class="lineNum">      86 </span>            :   }
<span class="lineNum">      87 </span>            : 
<span class="lineNum">      88 </span><span class="lineNoCov">          0 :   for (DefinedTestIter it = defined_test_names_.begin();</span>
<span class="lineNum">      89 </span><span class="lineNoCov">          0 :        it != defined_test_names_.end();</span>
<span class="lineNum">      90 </span>            :        ++it) {
<span class="lineNum">      91 </span><span class="lineNoCov">          0 :     if (tests.count(*it) == 0) {</span>
<span class="lineNum">      92 </span><span class="lineNoCov">          0 :       errors &lt;&lt; &quot;You forgot to list test &quot; &lt;&lt; *it &lt;&lt; &quot;.\n&quot;;</span>
<span class="lineNum">      93 </span>            :     }
<span class="lineNum">      94 </span>            :   }
<span class="lineNum">      95 </span>            : 
<span class="lineNum">      96 </span><span class="lineNoCov">          0 :   const std::string&amp; errors_str = errors.GetString();</span>
<span class="lineNum">      97 </span><span class="lineNoCov">          0 :   if (errors_str != &quot;&quot;) {</span>
<span class="lineNum">      98 </span><span class="lineNoCov">          0 :     fprintf(stderr, &quot;%s %s&quot;, FormatFileLocation(file, line).c_str(),</span>
<span class="lineNum">      99 </span><span class="lineNoCov">          0 :             errors_str.c_str());</span>
<span class="lineNum">     100 </span><span class="lineNoCov">          0 :     fflush(stderr);</span>
<span class="lineNum">     101 </span><span class="lineNoCov">          0 :     posix::Abort();</span>
<span class="lineNum">     102 </span>            :   }
<span class="lineNum">     103 </span>            : 
<span class="lineNum">     104 </span><span class="lineNoCov">          0 :   return registered_tests;</span>
<span class="lineNum">     105 </span>            : }
<span class="lineNum">     106 </span>            : 
<span class="lineNum">     107 </span>            : #endif  // GTEST_HAS_TYPED_TEST_P
<a name="108"><span class="lineNum">     108 </span>            : </a>
<span class="lineNum">     109 </span>            : }  // namespace internal
<span class="lineNum">     110 </span><span class="lineNoCov">          0 : }  // namespace testing</span>
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.11</a></td></tr>
  </table>
  <br>

</body>
</html>
